package com.example.mvp.model;

import com.example.mvp.model.entity.User;

/**
 * Created by r on 2017/5/23.
 */

public class IUserBiz implements UserBiz {
    @Override
    public void loginModel(final String name, final String pwd, final OnLoginListener loginListener) {
        new Thread(){
            @Override
            public void run() {
                super.run();
                try {
                    sleep(2000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                if ("lzs".equals(name)&&"123".equals(pwd)) {
                    User user=new User();
                    user.setUsername(name);
                    user.setUserpwd(pwd);
                    loginListener.loginSuccess(user);
                }else{
                    loginListener.loginFaild();
                }
            }
        }.start();
    }
}
